import { fetchChannelAPI } from "@/apis/list";
import { useEffect } from "react";
const List = () => {
  // fetchChannelAPI().then((res) => {
  //   console.log("获取频道列表", res.data.data.channels);
  // });

  const fetchChannel = async () => {
    try {
      const res = await fetchChannelAPI();
      console.log("获取频道列表", res.data.data.channels);
    } catch (error) {
      console.log("获取频道列表失败", error);
    }
  };
  
  useEffect(() => {
    fetchChannel();
  }, []);

  return <div>this is List</div>;
};

export default List;
